<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{margin: 0;padding: 0;}
        .big_div{
            width: 100%;
            background: red;
        }
        .content{
            width: 1030px;
            background: pink;
            margin: 0 auto;
        }
        #list{
            width: 100%;
            display: flex;
            justify-content: space-between;
            flex-wrap: wrap;
        }
        #list li{
            list-style: none;
            width: 250px;
            height: 200px;
            background: green;
            margin-bottom: 10px;
        }
        #list li img{
            width: 100%;
            height: 100%;
        }
    </style>
</head>
<body>
    <div class="big_div">
        <div class="content">
            <ul id="list">
                <!-- <li>
                    <img src="https://img.zcool.cn/community/031nvs5rqwq3jdqow374oly3330.png" alt="">
                </li> -->
            </ul>
        </div>
    </div>

    <!-- <span id="span1"></span> -->
</body>
<script>



    var data=["https://img.zcool.cn/community/031nvs5rqwq3jdqow374oly3330.png",
            "https://img.zcool.cn/community/031h9t8cnmprxhox9ybbglq3538.png",
            "https://img.zcool.cn/community/031jopc1b9evigmykwmdckw3234.png",
            "https://img.zcool.cn/community/031tnt8enqmeyt8ai61ui0w3139.png",
            "https://img.zcool.cn/community/0319wfltdillutdmbtiuj7f3935.png",
            "https://img.zcool.cn/community/031qbca0da3uja3wkujtv9i3035.png",
            "https://img.zcool.cn/community/031xlalfgu6st2olrtqhmwt3130.png",
            "https://img.zcool.cn/community/031onsa2sc2gsyegygxcxkd3533.png",
            "https://img.zcool.cn/community/031nvs5rqwq3jdqow374oly3330.png",
            "https://img.zcool.cn/community/031h9t8cnmprxhox9ybbglq3538.png",
            "https://img.zcool.cn/community/031jopc1b9evigmykwmdckw3234.png",
            "https://img.zcool.cn/community/031tnt8enqmeyt8ai61ui0w3139.png",
            "https://img.zcool.cn/community/0319wfltdillutdmbtiuj7f3935.png",
            "https://img.zcool.cn/community/031qbca0da3uja3wkujtv9i3035.png",
            "https://img.zcool.cn/community/031xlalfgu6st2olrtqhmwt3130.png",
            "https://img.zcool.cn/community/031onsa2sc2gsyegygxcxkd3533.png"];
       
        var oList = document.getElementById("list");
        // var html = "";
        // // for(var i = 0;i < data.length;i++){
        // //     // console.log(data[i]);
        // //     html += `<li>
        // //             <img src="${data[i]}" alt="">
        // //         </li>`;
        // // }
        // data.forEach(function(item){
        //     html += `<li>
        //             <img src="${item}" alt="">
        //         </li>`;
        // })
        // oList.innerHTML = html;

        oList.innerHTML = data.reduce(function(total,item){
            total += `<li>
                    <img src="${item}" alt="">
                </li>`;
            return total;
        },"")

</script>
</html>